package com.zhu.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhu.pojo.User;
import com.zhu.pojo.UserInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;


@Mapper
public interface UserMapper extends BaseMapper<User> {
    @Insert("insert into user (username,password) values (#{username},#{password})")
    void register(User user);

    @Select("select * from user where username=#{username}")
    User login(User user);

    @Select("select * from userinfo where id = #{id}")
    UserInfo getinfo(int id);
}
